package com.fulihui.wgj.facade.service.mass;

import com.fulihui.common.error.InvokeServiceException;
import com.fulihui.common.result.rpc.BaseResult;
import com.fulihui.common.result.rpc.SimpleResult;
import com.fulihui.wgj.facade.dto.WxMassMsgLogDTO;
import com.fulihui.wgj.facade.request.mass.MassLogSendUpdateRequest;
import com.fulihui.wgj.facade.request.mass.WxMassLogCancelRequest;
import com.fulihui.wgj.facade.request.mass.WxMassLogPageQueryRequest;
import com.fulihui.wgj.facade.result.mass.WxMassLogPageResult;

import java.util.List;

/**
 * 图文发送记录Service
 *
 * @author wang_wx
 * @date 2018-08-01
 */
public interface WxMassLogService {

    /**
     * 查询发送记录-分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    WxMassLogPageResult pageQuerySendLogs(WxMassLogPageQueryRequest request) throws InvokeServiceException;

    /**
     * 图文群发记录发送更新--如成功数、失败数、状态等--累加原来的数字
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult updateMassLogAccumulate(MassLogSendUpdateRequest request) throws InvokeServiceException;

    /**
     * 查询图文群发定时任务
     *
     * @return
     */
    SimpleResult<List<WxMassMsgLogDTO>> queryMassLogs4Job();

    /**
     * 取消图文发送
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult cancelMassLog(WxMassLogCancelRequest request) throws InvokeServiceException;
}
